package cn.thornbird.orgsync.model.wechat;

import cn.thornbird.orgsync.model.IResponse;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class UserDetail extends UserList.User implements IResponse {

    @JsonProperty("errcode")
    private Integer errorCode;

    @JsonProperty("errmsg")
    private String errorMessage;

    @Override
    public boolean isSuccess() {
        return errorCode != null && errorCode.intValue() == 0;
    }

}
